#ifndef WIDGET_H
#define WIDGET_H

#include "systemHead.h"
#include "myopenglrender.h"

class Screen : public QMainWindow
{
    Q_OBJECT

public:
    Screen(QWidget *parent = nullptr);
    virtual ~Screen();
    const static constexpr int Width = 1280;
    const static constexpr int Height = 720;
    static void updateOpenGLData(std::unique_ptr<H264Frame> ele, int64_t);
private slots:
    void acceptProgress(double);//参数是占总进度的比例
signals:
    void reset();
    void initDuration(double);
private:
    void dragEnterEvent(QDragEnterEvent *event) override;
    void dropEvent(QDropEvent *event) override;    
private:
    FFmpegDecode            _decode;
    QString                 _filePath;
    MyOpenGLRender*         _pOpenGLWidget = nullptr;

};
#endif // WIDGET_H
